Skip to content

MNTOR-4448: merge dup subscriber script #5907

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

MNTOR-4448: merge dup subscriber script #5907

wants to merge 1 commit into from

Conversation

mansaj
Copy link
Collaborator

@mansaj mansaj commented May 19, 2025

References:

Jira: MNTOR-4448

Description

This script is meant to be run as a one-off job that needs to be run in a pod. It implements the cohort-based strategy for merging duplicate subscriber entries where multiple subscribers share the same fxa_uid.
The script:

    1. Identifies all duplicate fxa_uids
    1. Categorizes them into 4 cohorts based on paid status and activity
    1. Processes each cohort with appropriate merge logic
    1. Updates related tables to point to the winning subscriber record
    1. Performs all operations in transactions with logging

How to test

See additional testing doc / explaination

Checklist (Definition of Done)

  • Commits in this PR are minimal and have descriptive commit messages.
  • I've added or updated the relevant sections in readme and/or code comments
  • I've added a unit test to test for potential regressions of this bug.
  • Product Owner accepted the User Story (demo of functionality completed) or waived the privilege.
  • All acceptance criteria are met.
  • Jira ticket has been updated (if needed) to match changes made during the development process.
  • Jira ticket has been updated (if needed) with suggestions for QA when this PR is deployed to stage.

Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant